package com.renjiyue.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("user")
@Scope("prototype")
//相当于配置文件中<bean id="user" class="当前注解的类"/>
public class User {

    public String name;
    @Value("renijyue")
    public void setName(String name) {
        this.name = name;
    }
}
